package com.example.autocreatenotesdemo.rest;

import com.example.autocreatenotesdemo.service.ICreateNote;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;

/**
 * @author susc
 * @title: AutoCreateNotesController
 * @projectName auto-create-notes-demo
 * @description: 自动生成注释Controller
 * @date 2022/1/79:12
 */
@RequestMapping("note")
@RestController
public class AutoCreateNotesController {

    private ICreateNote createNote;

    @Autowired
    public AutoCreateNotesController(ICreateNote createNote) {
        this.createNote = createNote;
    }

    @GetMapping("/create")
    public void createNotes(String path) throws IOException {
        createNote.createNote(path);
    }
}
